'''函数的形参定义'''

def f1(x,y,z=None):
    if z is None or z==0:
        return x+y
    else:
        return (x+y)%z


def f2(a,b,*args,c,**dargs):
    print(a,b,args,dargs)

# f2(1,2,33,44,55,c=66,da1=10,da2=20)

def f3(*args,**dargs):
    print(args,dargs)

# f3(99,88,77,a=1,b=2)

# range(10) range(1,10) range(1,10,2)



'''自己写的range'''
def myrage(n,*args):
    l = []
    if  n is not None and len(args)==0:
        i=0
        while n>=1:
            l.append(i)
            i=i+1
            n-=1
    elif len(args) == 1:
        m=args[0]
        while m > 1:
            l.append(n)
            n = n + 1
            if n>=args[0]:
                break
            m-= 1
    elif len(args) == 2:
        m=args[0]
        while m > 1:
            l.append(n)
            n = n + args[1]
            if n>=args[0]:
                break
            m -= 1
    else:
        print("传参错误")
    return l



print(myrage(10,50))


